package com.example.juyixia;


import android.os.Bundle;
import android.app.Fragment;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.RelativeLayout;

public class Active_Fragment extends Fragment {
	private RelativeLayout mRe_MyAct;
	private RelativeLayout mRe_NewAct;
	private RelativeLayout mRe_HisAct;
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View view = inflater.inflate(R.layout.fragment_03, container, false);
		
		return view;
	}
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
		mRe_MyAct =  (RelativeLayout) getActivity().findViewById(R.id.re_myact);
		mRe_MyAct.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mRe_MyAct = (RelativeLayout) getActivity().findViewById(R.id.re_myact);
				Intent intent = new Intent(getActivity(), MyActiveActivity.class);
				startActivity(intent);
			}
		});
		mRe_NewAct =  (RelativeLayout) getActivity().findViewById(R.id.re_newact);
		mRe_NewAct.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mRe_NewAct = (RelativeLayout) getActivity().findViewById(R.id.re_myact);
				Intent intent = new Intent(getActivity(), NewActiveActivity.class);
				startActivity(intent);
			}
		});
		mRe_HisAct =  (RelativeLayout) getActivity().findViewById(R.id.re_hisact);
		mRe_HisAct.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mRe_HisAct = (RelativeLayout) getActivity().findViewById(R.id.re_myact);
				Intent intent = new Intent(getActivity(), HistoryActiveActivity.class);
				startActivity(intent);
			}
		});
	}
	
}
